import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

import '@/styles/index.scss' // global css
import '@/styles/gzdf.scss' // gz css

import App from './App'
import router from './router'
import store from './store'
//import $ from 'jquery'

import '@/icons' // icon
import '@/permission' // permission control
import { hasBtnPermission } from './utils/permission' // button permission

import './styles/element-variables.scss'
import  *  as  echarts  from  'echarts'
import BabelPolyfill from 'babel-polyfill'

import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

import Pagination from "@/components/Pagination";
//自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar"

import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree

// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)

Vue.use(VueQuillEditor);

Vue.use(BabelPolyfill)
    // import 'es6-promise/auto'


Vue.use(ElementUI, { locale })

// Vue.use(eIconPicker, {
//   FontAwesome: true,
//   ElementUI: true,
//   eIcon: true,//自带的图标，来自阿里妈妈
//   eIconSymbol: true,//是否开启彩色图标
//   addIconList: [],
//   removeIconList: [],
//   zIndex: 3100//选择器弹层的最低层,全局配置)
// })

Vue.config.productionTip = false
Vue.prototype.$echarts = echarts

Vue.prototype.hasPerm = hasBtnPermission //设置全局变量

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})